3.1.94 \(\int \frac {x (a+b \log (c x^n))^2}{d+e x} \, dx\) [94]

Optimal. Leaf size=130 \[ -\frac {2 a b n x}{e}+\frac {2 b^2 n^2 x}{e}-\frac {2 b^2 n x \log \left (c x^n\right )}{e}+\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{e}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x}{d}\right )}{e^2}-\frac {2 b d n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {e x}{d}\right )}{e^2}+\frac {2 b^2 d n^2 \text {Li}_3\left (-\frac {e x}{d}\right )}{e^2} \]

[Out]

-2*a*b*n*x/e+2*b^2*n^2*x/e-2*b^2*n*x*ln(c*x^n)/e+x*(a+b*ln(c*x^n))^2/e-d*(a+b*ln(c*x^n))^2*ln(1+e*x/d)/e^2-2*b
*d*n*(a+b*ln(c*x^n))*polylog(2,-e*x/d)/e^2+2*b^2*d*n^2*polylog(3,-e*x/d)/e^2

________________________________________________________________________________________

Rubi [A]
time = 0.11, antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2395, 2333, 2332, 2354, 2421, 6724} \begin {gather*} -\frac {2 b d n \text {PolyLog}\left (2,-\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^2}+\frac {2 b^2 d n^2 \text {PolyLog}\left (3,-\frac {e x}{d}\right )}{e^2}-\frac {d \log \left (\frac {e x}{d}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{e^2}+\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{e}-\frac {2 a b n x}{e}-\frac {2 b^2 n x \log \left (c x^n\right )}{e}+\frac {2 b^2 n^2 x}{e} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x*(a + b*Log[c*x^n])^2)/(d + e*x),x]

[Out]

(-2*a*b*n*x)/e + (2*b^2*n^2*x)/e - (2*b^2*n*x*Log[c*x^n])/e + (x*(a + b*Log[c*x^n])^2)/e - (d*(a + b*Log[c*x^n
])^2*Log[1 + (e*x)/d])/e^2 - (2*b*d*n*(a + b*Log[c*x^n])*PolyLog[2, -((e*x)/d)])/e^2 + (2*b^2*d*n^2*PolyLog[3,
 -((e*x)/d)])/e^2

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2333

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2354

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[Log[1 + e*(x/d)]*((a +
b*Log[c*x^n])^p/e), x] - Dist[b*n*(p/e), Int[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2395

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rule 2421

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> Simp
[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c*x^n])^p/m), x] + Dist[b*n*(p/m), Int[PolyLog[2, (-d)*f*x^m]*((a + b*L
og[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \frac {x \left (a+b \log \left (c x^n\right )\right )^2}{d+e x} \, dx &=\int \left (\frac {\left (a+b \log \left (c x^n\right )\right )^2}{e}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{e (d+e x)}\right ) \, dx\\ &=\frac {\int \left (a+b \log \left (c x^n\right )\right )^2 \, dx}{e}-\frac {d \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{d+e x} \, dx}{e}\\ &=\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{e}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x}{d}\right )}{e^2}+\frac {(2 b d n) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {e x}{d}\right )}{x} \, dx}{e^2}-\frac {(2 b n) \int \left (a+b \log \left (c x^n\right )\right ) \, dx}{e}\\ &=-\frac {2 a b n x}{e}+\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{e}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x}{d}\right )}{e^2}-\frac {2 b d n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {e x}{d}\right )}{e^2}-\frac {\left (2 b^2 n\right ) \int \log \left (c x^n\right ) \, dx}{e}+\frac {\left (2 b^2 d n^2\right ) \int \frac {\text {Li}_2\left (-\frac {e x}{d}\right )}{x} \, dx}{e^2}\\ &=-\frac {2 a b n x}{e}+\frac {2 b^2 n^2 x}{e}-\frac {2 b^2 n x \log \left (c x^n\right )}{e}+\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{e}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x}{d}\right )}{e^2}-\frac {2 b d n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {e x}{d}\right )}{e^2}+\frac {2 b^2 d n^2 \text {Li}_3\left (-\frac {e x}{d}\right )}{e^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 103, normalized size = 0.79 \begin {gather*} \frac {e x \left (a+b \log \left (c x^n\right )\right )^2-2 b e n x \left (a-b n+b \log \left (c x^n\right )\right )-d \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x}{d}\right )-2 b d n \left (\left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {e x}{d}\right )-b n \text {Li}_3\left (-\frac {e x}{d}\right )\right )}{e^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x*(a + b*Log[c*x^n])^2)/(d + e*x),x]

[Out]

(e*x*(a + b*Log[c*x^n])^2 - 2*b*e*n*x*(a - b*n + b*Log[c*x^n]) - d*(a + b*Log[c*x^n])^2*Log[1 + (e*x)/d] - 2*b
*d*n*((a + b*Log[c*x^n])*PolyLog[2, -((e*x)/d)] - b*n*PolyLog[3, -((e*x)/d)]))/e^2

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.20, size = 2420, normalized size = 18.62

method result size
risch \(\text {Expression too large to display}\) \(2420\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*ln(c*x^n))^2/(e*x+d),x,method=_RETURNVERBOSE)

[Out]

I*ln(x^n)*d/e^2*ln(e*x+d)*b^2*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+I*n*d/e^2*ln(e*x+d)*ln(-e*x/d)*b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)^2-I*n*d/e^2*ln(e*x+d)*ln(-e*x/d)*b^2*Pi*csgn(I*c*x^n)^3-I/e*x*Pi*a*b*csgn(I*c)*csgn(I*x^
n)*csgn(I*c*x^n)-I*d/e^2*ln(e*x+d)*Pi*a*b*csgn(I*x^n)*csgn(I*c*x^n)^2+I*n*d/e^2*dilog(-e*x/d)*b^2*Pi*csgn(I*c)
*csgn(I*c*x^n)^2+I*d/e^2*n*b^2*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-I/e*x*ln(x^n)*b^2*Pi*csgn(I*c)*csgn(I*x^
n)*csgn(I*c*x^n)-I*ln(x^n)*d/e^2*ln(e*x+d)*b^2*Pi*csgn(I*c)*csgn(I*c*x^n)^2+I/e*n*x*b^2*Pi*csgn(I*c)*csgn(I*x^
n)*csgn(I*c*x^n)+I*d/e^2*ln(e*x+d)*Pi*a*b*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-I*d/e^2*ln(e*x+d)*ln(c)*Pi*b^2*c
sgn(I*c)*csgn(I*c*x^n)^2-I*d/e^2*ln(e*x+d)*ln(c)*Pi*b^2*csgn(I*x^n)*csgn(I*c*x^n)^2

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))^2/(e*x+d),x, algorithm="maxima")

[Out]

-(d*e^(-2)*log(x*e + d) - x*e^(-1))*a^2 + integrate((b^2*x*log(x^n)^2 + 2*(b^2*log(c) + a*b)*x*log(x^n) + (b^2
*log(c)^2 + 2*a*b*log(c))*x)/(x*e + d), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))^2/(e*x+d),x, algorithm="fricas")

[Out]

integral((b^2*x*log(c*x^n)^2 + 2*a*b*x*log(c*x^n) + a^2*x)/(x*e + d), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x \left (a + b \log {\left (c x^{n} \right )}\right )^{2}}{d + e x}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*ln(c*x**n))**2/(e*x+d),x)

[Out]

Integral(x*(a + b*log(c*x**n))**2/(d + e*x), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))^2/(e*x+d),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)^2*x/(x*e + d), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{d+e\,x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(a + b*log(c*x^n))^2)/(d + e*x),x)

[Out]

int((x*(a + b*log(c*x^n))^2)/(d + e*x), x)

________________________________________________________________________________________